import Vue from "vue";
import VueRouter from "vue-router";
import Index from "@/pages/Index";
import Login from "@/pages/Login";
import AddGoods from "@/pages/AddGoods";
import GoodsList from "@/pages/GoodsList";
import CartList from "@/pages/CartList";
Vue.use(VueRouter);
export default new VueRouter({
	routes:[
		{
			path:"/",
			component:Index,
			children:[
				{
					path:"/",
					component:AddGoods
				},{
					path:"/goodsList",
					component:GoodsList,
					meta: {
						title: '商品列表'
					}
				},{
					path:"/cartList",
					component:CartList,
					meta: {
						isAuthor: true,
						title: '我的购物车'
					}
				}
			]
		},{
			path:"/login",
			component:Login,
			meta: {
				title: '登陆'
			}
		}
	],
	mode:"history",
	// 高亮的样式
	linkActiveClass:"active"
})